<script type="text/javascript">
	$(function(){
		$(':checkbox').change(function(){
			var ids = [];
			var weight = 0;
			$('input[name=id]').each(function(index,item){
                            if(  $(item).is(':checked')){                                    
                                    ids.push($(item).val());
                                    weight += parseInt($(item).attr('weight'));
                            }

			});
			$("#store_ids").val(ids.join(','));
			$(".operating i,.warehouse_num i").text(ids.length);
			$(".count em").text(weight);
                        
		})
                
                 $('.guolv li').eq(0).hover(function(){
                    $('.guolv .xiala').eq(0).show();
                    $('a',this).addClass('xialaon');
                }, function(){
                    $('.guolv .xiala').eq(0).hide();
                    $('a',this).removeClass('xialaon');
                });
                
                $('.guolv li').eq(1).hover(function(){
                    $('.guolv #time').show();
                    $('a',this).addClass('xialaon');
                }, function(){
                    $('.guolv #time').hide();
                    $('a',this).removeClass('xialaon');
                });
	})
</script>
<div class="center">
	<div class="home">
    	<div class="home_left">
           <?php echo $this->partial('member/menu.phtml',array('uCount' => $this->uCount,'menuId'=>$this->menuId,'user'=>$this->user,'account'=>$this->account)); ?>
        </div>
    	<div class="home_right">

            <div class="storehousetop">
                <div class="storehouse">
                    <div class="cloudyb">
                        <span>预报入库</span>
                    </div>
                    <div class="storehouseinfo">
                        <h1>预报入库</h1>
                        <div class="storehousenum">
                        	<h3>交易提醒：</h3>
                            <ul>
                                <li><a href="/member/mystore">我的库存</a></li>                                
                                <li><a href="/member/waybill">我的国际运单</a></li>
                            </ul>
                            <p><a href="http://help.uuch.com/?p=62" target="_blank"><i></i>如何使用云仓库？</a></p>
                        </div>
                    </div>
                </div>
                            
                <div class="storehousenav">
                    <ul>
                        <li class="storehouseon"><a href="#"><i class="storehouse5"></i>预报列表<?php if($this->uCount["ingstore"]==0) echo ''; else echo '<span>'.$this->uCount["ingstore"].'</span>';?></a></li>                        
                        <li><a href="/member/instore"><i class="storehouse4"></i>预报入库</a></li>                        
                    </ul>
                </div>
                
            </div>
            
            <div class="yubaolist">
            	<div class="forecastname">
                	<h2>预报列表</h2>
                    <div class="guolv">
                        <ul>
                            <li class="state">
                                <div class="rmbxl"><a href="#"><span>所有状态</span></a></div>
                                <div class="xiala" id="state"  style="display:none;">
                                    <dl>
                                        <dd><a href="?state=1">已入云仓库</a></dd>
                                        <dd><a href="?state=0">等待入库</a></dd>
                                    </dl>
                                </div>
                            </li>
                            <li class="time">
                                <div class="rmbxl"><a  href="?stime=-3&etime=1"><span>最近三个月</span></a></div>
                                <div class="xiala" id="time" style="display:none;">
                                    <dl>
                                        <dd><a href="?stime=-6&etime=1">最近半年</a></dd>
                                        <dd><a href="?stime=-12&etime=1">最近一年</a></dd>
                                        <dd><a href="?stime=-36&etime=-12">一年以前</a></dd>
                                    </dl>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                
                
                <div class="forecasttable">
                    <table>
                        <tr>
                            <th class="f1">创建时间</th>
                            <th class="f2">预报包裹来源 | 名称</th>
                            <th class="f3">快递公司</th>
                            <th class="f4">状态</th>
                            <th class="f5">操作</th>
                        </tr>
                        <?php $i=1; foreach ($this->ingstorelist as $ingItem) {?>
                        <tr<?php if(fmod($i,2)==0) echo "  class='hui'"; ?>>
                            <td class="f1"><?php echo $ingItem->createtime;?></td>
                            <td class="f2">
                            	<div class="forecastinfo">
                                    <h3><span>[<?php echo $ingItem->ShipTypeBy->Name;?>]</span><a target="_blank" href="/member/forecastdetail?id=<?= $ingItem->Id ?>"><?php echo $ingItem->name;?></a></h3>
                                    <p>货物备注：<?= strlen($ingItem->remark)>50?(mb_substr($ingItem->remark,0,20,'utf-8').'...'):$ingItem->remark ?></p>
                                    <p>快递单号：<?= $ingItem->ShipNo ?> <a href="/member/forecastdetail?id=<?= $ingItem->Id ?>" target="_blank" title="查看物流详情">[查看物流详情]</a></p>
                                </div>
                            </td>
                            <td class="f3"><?php echo $ingItem->shipType;?></td>
                            <td class="f4">
                            	<ul>
                                    <li <?php if($ingItem->state==1 ) echo 'class="green"';?>><?php echo $ingItem->statename;?></li>
                                    <!--<li><a href="#">预报详情</a></li>
                                    <li><a href="#">物流跟踪</a></li>-->
                                </ul>
                            </td>
                            <td class="f5"><div class="shan"><?php  if($ingItem->state==0) echo '<a href="?oper=del&id='.$ingItem->id.'">删除</a>'?></div></td>
                        </tr>
                        <?php $i++;} ?>                        
                    </table>
                    

                    
                </div>
                <div class="toolbar" <?php if(empty($this->ingstorelist))  echo "style='display: none'"; ?>>
                    <?php echo $this->partial('paging.phtml',array("pages"=>$this->ingstores)); ?>
               </div>
             <div class="Noinventory" <?php if(!empty($this->ingstorelist)) echo "style='display:none;'";  ?>>
                	<div class="no_pic2" >
                    	预报入库为空
                    </div>
                    <div class="NOsm">
                        <h2>您还没有物品进行预报入库</h2>
                        <p>猜您接下来会：<a href="/member/instore/">预报入库</a><span>|</span><a href="/purchase/agent/">我要代购</a></p>
                    </div>
               </div>
            </div>

		</div>
    </div>
</div>
